package com.qf.ks.controller;

import com.qf.ks.dto.R;
import com.qf.ks.dto.UserDto;
import com.qf.ks.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserController {

    private UsersService usersService;
    @Autowired
    public void setUsersService(UsersService usersService) {
        this.usersService = usersService;
    }

    @PostMapping("/newuser")
    public R addUser(@RequestBody UserDto user) {
        System.out.println("sss");
        usersService.AddUsers(user);
        System.out.println("sdd");
        return R.setOk(null);
    }
}
